package pku;

import java.util.HashMap;
import java.util.Map;

public class MessageHeaderConstant {
	
	private static Map<String, Integer> headerMap = new HashMap<String, Integer>();
	
	private static String[] headerInverseMap = new String[16];
	
	static {
		headerMap.put("MessageId", 0);
		headerMap.put("Topic", 1);
		headerMap.put("BornTimestamp", 2);
		headerMap.put("BORN_HOST", 3);
		headerMap.put("StoreTimestamp", 4);
		headerMap.put("StoreHost", 5);
		headerMap.put("StartTime", 6);
		headerMap.put("StopTime", 7);
		headerMap.put("Timeout", 8);
		headerMap.put("Priority", 9);
		headerMap.put("Reliability", 10);
		headerMap.put("SearchKey", 11);
		headerMap.put("ScheduleExpression", 12);
		headerMap.put("ShardingKey", 13);
		headerMap.put("ShardingPartition",14);
		headerMap.put("TraceId", 15);
		
		
		headerInverseMap[0] ="MessageId";
		headerInverseMap[1] ="Topic";
		headerInverseMap[2] ="BornTimestamp";
		headerInverseMap[3] ="BORN_HOST";
		headerInverseMap[4] ="StoreTimestamp";
		headerInverseMap[5] ="StoreHost";
		headerInverseMap[6] ="StartTime";
		headerInverseMap[7] ="StopTime";
		headerInverseMap[8] ="Timeout";
		headerInverseMap[9] ="Priority";
		headerInverseMap[10] ="Reliability";
		headerInverseMap[11] ="SearchKey";
		headerInverseMap[12] ="ScheduleExpression";
		headerInverseMap[13] ="ShardingKey";
		headerInverseMap[14] ="ShardingPartition";
		headerInverseMap[15] ="TraceId";
		

	}
	
	public static int getHeaderMapValue(String key) {
		return headerMap.get(key);
	}
	
	public static String getHeaderInverseMapValue(int index) {
		return headerInverseMap[index];
	}
}
